<template>
  <div>
    <van-nav-bar
      :z-index="999"
      :fixed="true"
      left-arrow
      @click-left="onClickLeft"
      title="交通提示"
      :placeholder="true"
    ></van-nav-bar>
    <div class="tt-list">
      <div v-for="(item, index) in lists" :key="index" class="tt-listItem" @click="href('/DetailedAnnotation',item.id)" >
        <div>
          <img :src="item.logourl" alt />
        </div>
        <p>{{item.logtitle}}</p>
      </div>
    </div>
  </div>
</template>

<script>
import {PatternDesign} from '../../assets/js/api/exam'
export default {
  name: "TrafficTips",
  data() {
    return {
      lists: [
        // {
        //   img: require("../../assets/images/51.jpg"),
        //   text: "中间封闭"
        // },
        // {
        //   img: require("../../assets/images/51.jpg"),
        //   text: "中间封闭"
        // },
        // {
        //   img: require("../../assets/images/52.jpg"),
        //   text: "中间封闭"
        // },
        // {
        //   img: require("../../assets/images/52.jpg"),
        //   text: "中间封闭"
        // }
      ]
    };
  },

  mounted(){
    // console.log(this.$route.params.type)
    PatternDesign(this.$route.params.type).then(res=>{
      // console.log(res.data)
      this.lists = res.data
    })


  },

  methods: {

    href(url,id){
      this.$router.push({path:url+"/"+id})
    },

    onClickLeft() {
      this.$router.go(-1);
    }
  },
    created(){
    let dsBridge = require("dsbridge");
         dsBridge.call("goBack","", function() {
           history.go(-1);
         });
   },
};
</script>

<style>
</style>